//import 'package:amap_base/amap_base.dart';

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_hotwork/HomePage.dart';
import 'package:flutter_hotwork/homepage/BaseTitleBar.dart';
import 'package:flutter_hotwork/homepage/BaseViewBar.dart';
import 'package:flutter_hotwork/utils/DioUtils.dart';
// import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';

import 'TongJiNian.dart';
import 'TongJiRi.dart';
import 'TongJiYue.dart';

class tongjibaobiaoPage extends StatefulWidget {
  @override
  tongjibaobiaoState createState() => new tongjibaobiaoState();
}

class tongjibaobiaoState extends State<tongjibaobiaoPage> {

  @override
  void initState() {
    super.initState();
    DioUtils.createInstance();
  }

  @override
  void dispose() {
//    _amapLocation.stopLocate();
    super.dispose();
  }

  TabController _tabController;

  @override
  Widget build(BuildContext context) {
    double rpx = MediaQuery.of(context).size.height / 750;
    return

      Scaffold(
      appBar: new BaseViewBar(
          childView: new BaseTitleBar(
            "统计报表",
            leftIcon: 'images/fanhui.png',
            rightIcon:  '',
            rightClick: () {
            },
            leftClick: () {
              print("点击了左边干嘛啊。。。哦");
              Navigator.of(context).pop();
            },
          ),
          preferredSize: Size.fromHeight(50.0)),
      body:
      Container(
        child:
        DefaultTabController(
          length: 3,
          child:
          Column(
            children:[
              TabBar(
                labelColor: Colors.blue,
                unselectedLabelColor: Colors.black,
                indicatorColor: Colors.blue,
                tabs: <Widget>[
                  Tab(text: "日报"),
                  Tab(text: "月报"),
                  Tab(text: "年报"),
                ],
                controller: _tabController,  // 记得要带上tabController
              ),
              Container(

                height: rpx*596,
                // height: double.maxFinite,
                child:
                TabBarView(
                  controller: _tabController,
                  children: <Widget>[
                    Center(
                          child:   tongjibaobiaoribiaoPage(),
                    ),
                    Center(
                      child:   tongjibaobiaoyuebiaoPage(),
                    ),
                    Center(
                        child: tongjibaobiaonianbiaoPage(),
                    ),
                  ],
                ),
              ),

            ],
          ),
        ),
      ),
    );
  }


}






















